package com.kingtone.rongji;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class CardPaySuccessActivity extends BaseActivity {

	private Button checkBtn = null;
	private Button shopingBtn = null;
	private String orderNum = null;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.activity_card_pay_success);
		Intent intent = getIntent();
		if(intent.hasExtra("orderNum"))
		{
			orderNum = intent.getStringExtra("orderNum");
		}
		setupView();
	}
	
	private void setupView()
	{
		checkBtn= (Button)findViewById(R.id.card_pay_success_check_my_order);
		checkBtn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				Intent intent = new Intent(CardPaySuccessActivity.this, OrderDetailActivity.class);
				intent.putExtra("orderNum", orderNum);
				startActivity(intent);
			}
		});
		
		shopingBtn= (Button)findViewById(R.id.card_pay_success_go_shoping);
		shopingBtn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				Intent intent = new Intent(CardPaySuccessActivity.this, MainActivity.class);
				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(intent);
			}
		});
	}
}